Disk capacity continues to increase at phenomenal rates. At the same time, however, managing the disk space, especially for disks that may be used by more than one user, is becoming more troublesome. Even though disk capacity has increased greatly, it is still finite and may be consumed prematurely or by a small number of users if mismanaged. Thus, administrators or the like are left with the task of determining how much disk space each user should be allowed to consume and what to do if a user attempts to exceed the user's disk space.
What is needed is a method and system that assists administrators or the like in establishing and maintaining quotas on storage usage. Ideally, the method and system would address newly added or moved user accounts in addition to establishing and maintaining quotas for other types of storage usage.
Briefly, the present invention provides a method and system for establishing and maintaining quotas. An auto quota is defined and applied to a directory. Input and output is monitored to detect a successful operation that involves a subdirectory of the directory. A determination is made as to whether to apply a quota associated with the auto quota to the subdirectory. If the determination is that the quota is to be applied to the subdirectory, it is automatically applied.
In one aspect of the invention, the operations monitored are creates and renames. A rename may involve changing the name of the subdirectory, moving the subdirectory into the directory, or both changing the name of the subdirectory and moving the subdirectory into the directory.
In another aspect of the invention, determining whether a quota is applied to the subdirectory comprises determining whether another quota is already applied to the subdirectory, and if so, not applying the quota to the subdirectory.
In another aspect of the invention, determining whether a quota is applied to the subdirectory comprises determining whether the name of the subdirectory is included in an exclude list, and if so, not applying the quota to the subdirectory.
In one aspect of the invention, a filter monitors the inputs and outputs to a file system. The filter may execute in user mode or in kernel mode. The filter may communicate with another process in applying quotas to subdirectories of the directory.
Other aspects will become apparent from the following detailed description when taken in conjunction with the drawings, in which: